package io.shuttle.mbe.api

import io.shuttle.mbe.api.annotation.ChromeMinVersion
import io.shuttle.mbe.api.annotation.ChromeOSOnly
import io.shuttle.mbe.api.types.VoidFunction
import io.shuttle.mbe.core.Promise
////////////////////
// SystemLog
////////////////////
/**
 * Use the `Browser.systemLog` API to record Chrome system logs from extensions.
 *
 * Permissions: "systemLog"
 *
 * Note: Only available to policy installed extensions.
 * @platform ChromeOS only
 * @since Chrome 125
 */
@ChromeOSOnly
@ChromeMinVersion(125)
abstract class SystemLog {
    // Adds a new log record.
    abstract fun add(
        // The logging options.
        options: MessageOptions, callback: VoidFunction? = null): Promise<Void>

    data class MessageOptions(
        var message: String
    )
}